package cn.csc.module.shoppingCard.util;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import lombok.extern.slf4j.Slf4j;

/**
 * @author liuchuang
 * @version 1.0
 * @modify
 * @since 2025/3/24 15:48
 */
@Slf4j
public class CardNumberUtil {

    /**
     * 获取23位卡号
     */
    public static String getCardNumber(String workIp){
        long workId = Math.abs(workIp.hashCode()%31);
        log.info("workId : {}", workId);
        Snowflake snowflake = IdUtil.getSnowflake(workId);
        return snowflake.nextIdStr();
    }



}
